<template>
  <BasicModal  @register="registerModal" @success="handleSuccess" :width="1400" :title="title">
    <AttScheduleList :workDate="dateval" :departmentId = "departmentId" :rload="rload"></AttScheduleList>
  </BasicModal>
</template>

<script lang="ts" setup>
    import {ref, computed, unref} from 'vue';
    import {BasicModal, useModalInner} from '/@/components/Modal';
    import {BasicForm, FormSchema, useForm} from '/@/components/Form/index';
    import {autoSchedule, saveOrUpdate} from '../AttSchedule.api';
    import AttScheduleList from '../AttScheduleList.vue'
    // Emits声明
    const emit = defineEmits(['register','success']);
    const isUpdate = ref(true);
    const dateval = ref();
    const departmentId = ref();

    const reload = ref();

    const rload = (e)=>{
      reload.value = e;
    }

    //表单赋值
    const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
      setModalProps({confirmLoading: false,showCancelBtn:false,showOkBtn:false});
      console.log(data.departmentId);
      console.log(data.dateval);
      dateval.value = data.dateval;
      departmentId.value = data.departmentId;
      console.log(reload.value)
      reload.value();
    });
    //设置标题
    const title ="手动排班";
    //表单提交事件

</script>

<style lang="less" scoped>
	/** 时间和数字输入框样式 */
  :deep(.ant-input-number){
		width: 100%
	}

	:deep(.ant-calendar-picker){
		width: 100%
	}
</style>
